// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
 

:MUSIC_9


wait 0 
if and
0ADC:   test_cheat "peds"
056D:   actor $SECOND_PLAYER_ACTOR defined




jf @MUSIC_9 
0ACB: show_styled_text "CPU controlled ~b~Player 2~w~ will any peds around the path" time 2500 style 4


:Begin2
wait 0
if
056D:   actor $SECOND_PLAYER_ACTOR defined
else_jump @MUSIC_9
30@ = -1   
//:PEDS
//wait 0
//if
// 056D:  actor 30@ defined
// else_jump @PEDS
//jf @PEDS
//wait 0 
Actor.StorePos($SECOND_PLAYER_ACTOR, 21@, 22@, 23@)
//Audiostream.SetPosition($WAV16, $X, $Y, $Z)
//Audiostream.SetPosition($WAV16, -1807.2235, 905.662, 24.8906)



//Actor.StorePos($PLAYER_ACTOR, 17@, 18@, 19@)
//073E: get_car_in_sphere 17@ 18@ 19@ radius 60.0 model -1 handle_as $CAR 
//08E5: get_actor_in_sphere 21@ 22@ 23@ radius 30.0 handle_as 30@  

:PED_HUNT
wait 0 
08E5: get_actor_in_sphere 21@ 22@ 23@ radius 200.0 handle_as 30@  
if and
056D:   actor $SECOND_PLAYER_ACTOR defined
056D:  actor 30@ defined
else_jump  @NO_PED
jf @PED_HUNT

jump @FIGHT_IT

:NO_PED
wait 0
0ACD: show_text_highpriority "There's no peds around here, if you see peds in the streets type it in again." time 2500
jump @MUSIC_9


:FIGHT_IT
wait 0
if
056D:   actor $SECOND_PLAYER_ACTOR defined
else_jump @MUSIC_9

jf @FIGHT_IT
04C4: store_coords_to 1@ 2@ 3@ from_actor 30@ with_offset 50.0 0.0 5.0 
//02C1: store_to 1@ 2@ 3@ car_path_coords_closest_to 1@ 2@ 3@
04C4: store_coords_to 14@ 15@ 16@ from_actor 30@ with_offset 0.0 5.0 0.0 
//0638: AS_actor $SECOND_PLAYER_ACTOR stay_put 0
0631: put_actor $SECOND_PLAYER_ACTOR in_group $PLAYER_GROUP 
07CB: set_actor $SECOND_PLAYER_ACTOR supporting_fire 1 
0A20: disable_player $PLAYER_CHAR group_control_back 1
0631: put_actor $SECOND_PLAYER_ACTOR in_group $PLAYER_GROUP 
07CB: set_actor $SECOND_PLAYER_ACTOR supporting_fire 1 
0A20: disable_player $PLAYER_CHAR group_control_back 1
0946: set_actor $SECOND_PLAYER_ACTOR actions_uninterupted_by_weapon_fire 1
06C9: remove_actor $SECOND_PLAYER_ACTOR from_group

0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 1
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 6
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 0
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 5
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 4
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 2
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 3
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 7
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 8
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 9
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 10
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 11
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 12
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 13
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 14
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 15
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 16
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 24
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 25
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 26
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 27
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 28
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 29
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 30
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 31
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 17
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 18
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 19
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 20
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 21
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 22
0746: set_acquaintance 4 of_actors_pedtype 1   to_actors_pedtype 23
//0850: AS_actor $SECOND_PLAYER_ACTOR follow_actor $PLAYER_ACTOR 
05E2: AS_actor $SECOND_PLAYER_ACTOR kill_actor 30@  
actor.SetWalkStyle($SECOND_PLAYER_ACTOR, "PLAYER")
Actor.Health($SECOND_PLAYER_ACTOR) = 99999
actor.AddArmour($SECOND_PLAYER_ACTOR, 99999)
actor.SetMaxHealth($SECOND_PLAYER_ACTOR, 99999) 
05DE: AS_actor 30@ walk_around_ped_path


:ATTACK
wait 0 
if and
actor.Dead(30@)

//0ADC:   test_cheat "fight"
056D:   actor $SECOND_PLAYER_ACTOR defined
//0AB0:   key_pressed 16
//0AB0:   key_pressed 17 
//0AB0:   key_pressed 34  
else_jump @STOP
//jump @MUSIC_9
jf @ATTACK
actor.RemoveReferences(30@)
jump @Begin2
//jump @MUSIC_9    

:STOP
wait 0
if and 
0ADC:   test_cheat "peds"
056D:  actor $SECOND_PLAYER_ACTOR defined
else_jump @ATTACK
jf @STOP
actor.RemoveReferences(30@)
0687: clear_actor $SECOND_PLAYER_ACTOR task
0ACB: show_styled_text "CPU controlled ~b~Player 2~w~ has stop killing any peds now" time 2500 style 4

jump @MUSIC_9

